import React, { useState } from 'react';
import DescriptionsCondition from '@/components/DescriptionsCondition';
import DrawerCondition from '@/components/DrawerCondition';
import PopImgShow from '@/components/PopImgShow';
import { ShowTime } from '@/common/contact';
const Details = (props) => {
  const { dispatch, visible = {}, onClose, handleCallback, loading } = props;
  const { detail = {}, show } = visible;
  const formItems = [
    {
      label: '活码名称 ',
      
      name: 'codeName',
    },
    {
      label: '二维码中间的图片 ',
      
      name: 'image',
      render: (e) => {
        return <PopImgShow url={e}></PopImgShow>;
      },
    },
    {
      label: '扫码次数 ',
      
      name: 'scamAmount',
    },

    {
      label: '群总人数 ',
      
      name: 'chatUserAmount',
    },

    {
      label: '进群人数 ',
      
      name: 'addUserAmount',
    },
    {
      label: '退群人数 ',
      
      name: 'quitUserAmount',
    },
  ];
  const modalProps = {
    title: `群码详情`,
    visible: show,
    onClose,
  };
  return (
    <DrawerCondition {...modalProps}>
      <DescriptionsCondition formItems={formItems} initialValues={detail}></DescriptionsCondition>
    </DrawerCondition>
  );
};
export default Details;
